const path = require("path");
const getBaseCfg = require("./webpack.base");
const { merge } = require("webpack-merge");
// console.log(getBaseCfg(true),"--------ssss");

module.exports = merge(getBaseCfg(true), {
  mode: 'development',
  devtool: 'eval-cheap-module-source-map',
  devServer: {
    port: 8000,
    // proxy: [{
    //   context: ['/'], // 匹配所有以 /api 开头的路径
    //   target: 'https://localhost:3000',
    //   changeOrigin: true,
    // }],
    compress: false,
    hot: true,
    historyApiFallback: true,
    static: {
      directory: path.resolve(__dirname, "../public")
    },
  },

})